package com.ys.web.ws.send.vo;

import com.ys.utils.base.j2se.StringHandler;
import com.ys.utils.spring.config.SystemError;
import lombok.Data;

/**
 * @author quxinjun
 * @version 1.0.0
 * @ClassName QueryHistoryVo.java
 * @Description TODO
 * @createTime 2021年11月13日 14:37:00
 */
@Data
public class QueryHistoryVo {

    /**
     * 页码
     */
    public Integer pageNumber = 1;
    /**
     * 数量
     */
    public Integer pageSize = 20;
    /**
     * 消息类型
     */
    public String code;

    /**
     * 开始时间
     */
    public String startTime;

    /**
     * 结束时间
     */
    public String endTime;

    /**
     * 私聊：alias
     * 群聊：groupId
     */
    public String queryId;

    /**
     * 如果说是群聊消息，可以查看具体某个成员的信息
     */
    public String membersId;

    /**
     * 顺序
     */
    public String sort = "DESC";

    public void checkParam() {
        if (StringHandler.isEmpty(this.getQueryId())) {
            SystemError.wrapBs("500", "参数传递错误");
        }

        this.setPageNumber((this.pageNumber - 1) * this.pageSize);
    }

    public Integer getPageNumber() {
        return pageNumber;
    }

    public void setPageNumber(Integer pageNumber) {
        this.pageNumber = pageNumber;
    }

    public Integer getPageSize() {
        return pageSize;
    }

    public void setPageSize(Integer pageSize) {
        this.pageSize = pageSize;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getStartTime() {
        return startTime;
    }

    public void setStartTime(String startTime) {
        this.startTime = startTime;
    }

    public String getEndTime() {
        return endTime;
    }

    public void setEndTime(String endTime) {
        this.endTime = endTime;
    }

    public String getQueryId() {
        return queryId;
    }

    public void setQueryId(String queryId) {
        this.queryId = queryId;
    }

    public String getMembersId() {
        return membersId;
    }

    public void setMembersId(String membersId) {
        this.membersId = membersId;
    }

    public String getSort() {
        return sort;
    }

    public void setSort(String sort) {
        this.sort = sort;
    }
}
